package com.loto.insurance.mis.web.db.mapper;

import java.util.List;
import java.util.Map;

import com.loto.insurance.mis.web.entity.PolicyInfoAir;

public interface PolicyInfoAirMapper {

  // 创建保单信息
  long insertPolicyInfo(PolicyInfoAir policyInfo);

  // 根据订单ID批量更新保单支付状态
  int updatePolicyFeeStatusByOrderId(Map<String, Object> params);

  // 根据保单ID更新保单支付状态
  int updatePolicyFeeStatusById(Map<String, Object> params);

  // 根据订单ID批量更新保单状态
  int updatePolicyStatusByOrderId(Map<String, Object> params);

  // 根据保单ID更新保单状态
  int updatePolicyStatusById(Map<String, Object> params);

  // 根据订单ID获取保单信息
  List<PolicyInfoAir> findPolicyInfoByOrderId(long orderId);

  // 根据平台订单ID获取保单信息
  List<PolicyInfoAir> findPolicyInfoByPlatId(String platId);

  // 投保成功，根据对外订单号和订单ID更新支付成功或投保失败的保单信息
  int updatePolicyByOutOrderNoOrderId(Map<String, Object> params);

  // 根据对外订单号和订单ID更新保单状态
  int updatePolicyStatusByOutOrderNoOrderId(Map<String, Object> params);

  // 根据对外订单号和订单ID获取保单ID
  PolicyInfoAir findPolicyInfoByOutOrderNoOrderId(
	  Map<String, Object> params);
}
